package com.hfcsbc.constant;

/**
 * @author xs
 * date 2018/6/26 11:51
 */
public class SecurityConstants {

	/**
	 * sys_oauth_client_details 表的字段，不包括client_id、client_secret
	 */
	public static String CLIENT_FIELDS = "client_id, client_secret, resource_ids, scope, "
			+ "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, "
			+ "refresh_token_validity, additional_information, autoapprove";

	/**
	 * JdbcClientDetailsService 查询语句
	 */
	public static String BASE_FIND_STATEMENT = "select " + CLIENT_FIELDS
			+ " from sys_oauth_client_details";

	/**
	 * 默认的查询语句
	 */
	public static String DEFAULT_FIND_STATEMENT = BASE_FIND_STATEMENT + " order by client_id";

	/**
	 * 按条件client_id 查询
	 */
	public static String DEFAULT_SELECT_STATEMENT = BASE_FIND_STATEMENT + " where client_id = ?";

	/**
	 * 前缀
	 */
	public static String REDIS_PREFIX = "es_";

	/**
	 * 基础角色
	 */
	public static String BASE_ROLE = "ROLE_USER";
}
